import requests from '@/api/request'
// const SERVER_URL = 'user'
export default {
  // 调查专员分页查询
  queryAcceptorList (data) {
    return requests({
      url: `/v1/api/user/research/findUserOrgResearchList`,
      method: 'post',
      data
    })
  },
  // 查询全部用户
  queryAllUserList (data) {
    return requests({
      url: `/v1/api/user/user/queryByCondition`,
      method: 'post',
      data
    })
  },
  // 新增调查专员
  addAcceptor (data) {
    return requests({
      url: `/v1/api/user/research/addRecord`,
      method: 'post',
      data
    })
  },
  // 移除调查专员
  deleteAcceptor (data) {
    return requests({
      url: `/v1/api/user/research/removeUserOrgResearch?userId=${data}`,
      method: 'post'
    })
  },
  // 贷前机构名单查询
  queryInvestigativeList (data) {
    return requests({
      url: `/v1/api/user/research/findAllList`,
      method: 'post',
      data
    })
  },
  // 查询职务
  postQueryRoleData (data) {
    return requests({
      url: `/v1/api/user/role/queryByCondition`,
      method: 'post',
      data
    })
  },
  // 新增贷前调查机构
  addInvestigative (data) {
    return requests({
      url: `/v1/api/user/research/insert`,
      method: 'post',
      data
    })
  },
  // 获取调查机构下的调查人员
  getSettingData (data) {
    return requests({
      url: `/v1/api/user/research/findByOrganizationId?organizationId=${data}`,
      method: 'post'
    })
  },
  // 移除贷前调查机构名单
  deleteInvestigative (data) {
    return requests({
      url: `/v1/api/user/research/removeResearchOrg?organizationId=${data}`,
      method: 'post'
    })
  },
  // 编辑贷前调查机构名单
  editInvestigativeUser (data) {
    return requests({
      url: `/v1/api/user/research/edit`,
      method: 'post',
      data
    })
  },
  // 查询机构树
  getQueryOrgTree () {
    return requests({
      url: `/v1/api/user/organization/open/queryTree/performance`,
      method: 'get'
    })
  }
}
